package com.ruoyi.accountant.domain.other;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/***
 * 损益表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProfitLossReport implements Comparable<ProfitLossReport> {
    private Integer month; // 哪个月
    private BigDecimal money; //总额
    private String rname; // 原因名称
    private BigDecimal tax; // 税

    @Override
    public int compareTo(ProfitLossReport o) {
        if(this.getMonth() > o.getMonth()) {
            return 1;
        } else if(this.getMonth() < o.getMonth()) {
            return -1;
        }
        return 0;
    }
}
